import http from "@/utils/http"

//获取审批数据
export function getApproveInfo(params) {
  return http.get('/asset/process/findPending', {params})
}

//获取耗材借用信息
export function getMateriaBorrowInfo(id,type) {
  return http.get(`/system/assignments/materialDetail?id=${id}&type=${type}` )
}

//获取资产借用信息
export function getAssetBorrowInfo(id) {
  return http.get('/system/assignments/detail?id='+id)
}

// 获取资产报修单详情
export function getAssetRepairDetailInfo(id) {
  return http.get('/system/repair/detail?id='+id)
}

// 获取资产归还单详情
export function getAssetReturnDetailInfo(id) {
  return http.get('/system/assignments/detailAll?id='+id)
}

//审批 processId, result, userId,description
export function approveProcess(data) {
  return http.post(`/asset/process/approve`,data)
}

//撤销申请 revokeApprove
export function revokeApprove(processId) {
  return http.get(`/asset/process/revoke?processId=${processId}`)
}